import request from '@/utils/request'

let BASE_PREFIX = '/admin-api/module/fertilizerDistributorV1'

// 查询施肥机v1列表
export function listFertilizerDistributorV1(query) {
  return request({
    url: `${BASE_PREFIX}/list/inner`,
    method: 'get',
    params: query
  })
}

// 查询施肥机v1详细
export function getFertilizerDistributorV1(id) {
  return request({
    url: `${BASE_PREFIX}/inner/${id}`,
    method: 'get'
  })
}

// 新增施肥机v1
export function addFertilizerDistributorV1(data) {
  return request({
    url: `${BASE_PREFIX}/inner`,
    method: 'post',
    data: data
  })
}

// 修改施肥机v1
export function updateFertilizerDistributorV1(data) {
  return request({
    url: `${BASE_PREFIX}/inner`,
    method: 'put',
    data: data
  })
}

// 删除施肥机v1
export function delFertilizerDistributorV1(id) {
  return request({
    url: `${BASE_PREFIX}/inner/${id}`,
    method: 'delete'
  })
}

/**
 * 获取内置施肥机模块
 */
export function getInner() {
  return request({
    url: `${BASE_PREFIX}/inner`,
    method: 'get'
  })
}
